public class Solution {
    public String replaceSpace(String s) {
        //直接调用库函数
        // replace(老字符串,新字符串)
        String ans=s.replace(" ","%20");
        return ans;

    }
}